#ifndef INC_COLORPOLYGON_H
#define INC_COLORPOLYGON_H

#include "BaseTypes.h"
#include "Color.h"
#include "Point.h"
#include "ImageBuffer.h"
/*********************************************/
class Polygon
{
private:
	// Data
	Point3D			p[3];			// 3 vertices off the polygon
	Color			c[3];			// Fill color for the polygon
	bool			uniform;		// Are we using a uniform color for all vertices?

	// Methods
	void clip2DCohenSutherland() const;

public:
	// Operators
	virtual void operator=(const Polygon&);

	// Methods
	void setColor( const uint32&, const Color& );
	void setUniformColor( const Color& );
	void setPoint( uint8 index, Point3D p );
	Point3D getPoint( uint8 index ) const;
	virtual void drawWireFrame() const;
	virtual void drawZBuffer() const;
	virtual Color getColor( fl64 u, fl64 v ) const;

	// Constructor
	Polygon();
	Polygon(const Polygon&);
	~Polygon();
};
/*********************************************/

#endif // INC_COLORPOLYGON_H